In a data recording and reproducing apparatus for writing and reading data into and from a recording medium, errors are generally detected and corrected in order to prevent the errors from causing a serious problem. Particularly, in recent years, an error correction by use of a product code has been widely performed from the viewpoint of improvement in data reliability and higher data recording density.
Here, the product code can be defined as a matrix code formed by arranging user data in a matrix pattern and arranging parity codes in row and column directions. Moreover, the product code usually includes C1 codes in the row direction and C2 codes in the column direction. The C1 codes include C1 parities which are parity codes for correcting errors in the C1 codes, and the C2 codes include C2 parities which are parity codes for correcting errors in the C2 codes. In such a product code, the errors are actually corrected by performing correction of the C1 codes by use of the C1 parities (C1 correction) and correction of the C2 codes by use of the C2 parities (C2 correction) in this order. By use of this correction method, the rows that cannot be corrected by the C1 correction can be corrected by erasure correction in the C2 correction. Thus, many errors can be corrected.
Note that, as such a correction method for the product code, there have heretofore been proposed many methods (for example, see Patent Documents 1 and 2).    Patent Document 1: Japanese Patent Application Publication No. Hei 11 (1999)-203615 (Pages 5 to 7, FIG. 2)    Patent Document 2: Japanese Patent Application Publication No. Hei 11 (1999)-203797 (Pages 8 and 9, FIG. 2)